{template '_header'}
<script>document.title = "{if !empty($page)&&!empty($page['data']['page']['title'])}{$page['data']['page']['title']}{else}{$_W['shopset']['shop']['name']}{/if}"; </script>
<link rel="stylesheet" href="../addons/ewei_shopv2/static/js/dist/swiper/swiper.min.css">
<link href="../addons/ewei_shopv2/plugin/diypage/static/css/foxui.diy.css?v=201612121750"rel="stylesheet"type="text/css"/>
<style type="text/css">
    {if is_h5app()&&is_ios()}
        .fui-header ~ .diy-fixedsearch {top: 3.2rem;}
    {/if}
</style>
{if $page['type']==4}
    {template 'commission/common'}
{/if}
<div class='fui-page  fui-page-current {if $page['type']==3}member-page{elseif $page['type']==4}page-commission-index{/if}' style="top: 0;">
{if !empty($page['data']['page']['followbar'])}
    {php $this->followBar(true, $page['merch'])}
{/if}
{if !is_weixin()}
    <div class="fui-header">
        <div class="fui-header-left">
            {if $page['type']==1}
            <a href="{php echo mobileUrl()}" class="external"><i class="icon icon-home"></i> </a>
            {/if}
        </div>
        <div class="title">{if !empty($page)&&!empty($page['data']['page']['title'])}{$page['data']['page']['title']}{else}{$_W['shopset']['shop']['name']}{/if}</div>
        <div class="fui-header-right"></div>
    </div>
{/if}

{if !empty($diyitem_search)}
    {template 'diypage/template/tpl_fixedsearch'}
{/if}

<div class="fui-content {if $page['diymenu']>-1}navbar{/if}" id="container" style="background-color: {$page['data']['page']['background']}; {if $page['diymenu']>-1}padding-bottom: 0;{/if}">
    {if !empty($diyitems)}
        {loop $diyitems $diyitemid $diyitem}
            {template 'diypage/template/tpl_'.$diyitem['id']}
        {/loop}
        {template '_copyright'}
    {/if}
</div>

{if $page['diymenu']>-1}
    {php $this->footerMenus($page['diymenu'])}
{/if}

{php $diypage=true}

{if !empty($page['data']['page']['diylayer'])}
    {php $this->diyLayer(false, false, $page['merch'])}
{/if}
{if !empty($page['data']['page']['diygotop'])}
    {php $this->diyGotop(true, false, $page['merch'])}
{/if}

{if $_W['shopset']['shop']['order_flag']==1}
    {if $page['type']==2 || $page['type']==5}
        {php echo $this->diyOrder()}
    {/if}
    {/if}


<script language="javascript">
    
	$(".fui-notice").each(function () {
            var _this = $(this);
            var speed = _this.data('speed') * 1000;
            setInterval(function () {
                var length = _this.find("li").length;
                if (length > 1) {
                    _this.find("ul").animate({marginTop: "-1rem"}, 500, function () {
                        $(this).css({marginTop: "0px"}).find("li:first").appendTo(this)
                    })
                }
            }, speed)
        });
	
	
	require(['../addons/ewei_shopv2/plugin/diypage/static/js/mobile.js'], function(modal){
        modal.init();
    });
</script>

</div>

{template '_footer'}